<?php
require_once 'PHPUnit/Framework.php';
require_once 'TVB/PWORKS/util/CommonUtil.class.php';

class CastDictionaryUpdateAction extends PHPUnit_Framework_TestCase 
{
    public $url;

    public function setUp()
    {
        $this->url = 'http://pdes.tvb.com/update_cast_dictionary.html?ut=true';
    }

    public function tearDown()
    {
        unset($this->url);
    }

    public function testSuccess()
    {
        $param = array(
            'id'                => '149',
            'master'            => 'donald ut', 
            'chi_last_name'     => 'a1', 
            'chi_first_name'    => 'b2', 
            'eng_last_name'     => 'c3', 
            'eng_first_name1'   => 'd4', 
            'eng_first_name2'   => 'e5', 
            'others'            => 'f6', 
            'see_also'          => '', 
            'remark'            => 'g7', 
            'gender'            => '', 
            'is_chinese'        => '', 
        );
        $ret = CommonUtil::curl_test($this->url, $param);
        var_dump($ret);
    }

    public function testFailure()
    {
    }
}
